﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;

namespace WP8.NavigationFramework.Views
{
    public partial class Acerca : PhoneApplicationPage
    {
        public Acerca()
        {
            InitializeComponent();
        }

        protected override void OnNavigatedFrom(NavigationEventArgs e)
        {
            if (this.chbModoNinja.IsChecked.Value)
                this.NavigationService.RemoveBackEntry();

            base.OnNavigatedFrom(e);
        }

        private void btnVolver_Click(object sender, RoutedEventArgs e)
        {
            if (this.NavigationService.CanGoBack)
                this.NavigationService.GoBack();
        }

        private void btnRegistro_Click(object sender, RoutedEventArgs e)
        {
            this.NavigationService.Navigate(new Uri("/Views/Registro.xaml", UriKind.Relative));
        }
    }
}